//
//  BusStationViewController.swift
//  Community
//
//  Created by JKSD on 2019/7/30.
//  Copyright © 2019 ZKJ. All rights reserved.
//

import UIKit

class SWPTBusStationViewController: BaseViewController {
//    let tableView = UITableView()
    var dataSource = NSMutableArray()
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)

    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.navTitle = "公交"
        self.isShadow = true
        self.tableView.frame = CGRect (x: 0, y: AllTopNavHeight + 10, width: SCREEN_WIDTH, height: self.view.height)
        self.view.addSubview(self.tableView)
        
       
        
        let back = UIButton(type: UIButton.ButtonType.custom)
        back.frame = CGRect(x: 5,y: 20,width: 44,height: 44)
        back.setImage(UIImage.init(named: "back"), for: UIControl.State.normal)
        back.contentHorizontalAlignment = UIControl.ContentHorizontalAlignment.right
        back.addTarget(self, action: #selector(backAct), for: UIControl.Event.touchUpInside)
        self.navigationController?.navigationItem.leftBarButtonItem = UIBarButtonItem.init(customView: back)
    }
    @objc func backAct() {
        self.navigationController?.popViewController(animated: true)
    }
    
    
    
    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int{
        return self.dataSource.count
    }
    
    
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{
        var cell = tableView.dequeueReusableCell(withIdentifier: "cell")
        if (cell == nil) {
            cell = UITableViewCell.init(style: UITableViewCell.CellStyle.default, reuseIdentifier: "cell")
        }
        
        cell?.textLabel?.text = "RouteLine.price"
        return cell!
    }
    override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        return 50
    }
    override func numberOfSections(in tableView: UITableView) -> Int {
        return 1
    }
}
